package personal.xjl._23java1studentdemo.spring;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component("zhangsan")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Human {
    @Value("zhangsan")
    String name;
    private List<Car> cars;
    Map<String, Human> relatives;

    @Override
    public String toString() {
        return "Human{" +
                "name='" + name + '\'' +
                ", cars=" + cars +
                '}';
    }
}